﻿<tr>
    <td><p>
        <span data-bind="text: Id, visible: !IsNew()"></span>
        <span data-bind="visible: IsNew" style="color:blue">NEW</span>
    </p></td>
    <td><p>
        <span data-bind="text: Sponsor, visible: !IsNew()"></span>
        <span data-bind="visible: IsNew">
            <input data-bind="value: Sponsor, valueUpdate: 'afterkeydown'" />
        </span>
    </p></td>
    <td><p>
        <span data-bind="text: Protocol, visible: !IsNew()"></span>
        <span data-bind="visible: IsNew">
            <input data-bind="value: Protocol, valueUpdate: 'afterkeydown'" />
        </span>
    </p></td>
    <td class="noBorder">
        <p>
            <span data-bind="visible: IsNew">
                <button data-bind="click: $parent.SaveStudy">Save Study</button>
                &nbsp;&nbsp;
                <button data-bind="click: $parent.Cancel">Cancel Study</button>
            </span>
            <a data-bind="attr:{href:'/Sections/?studyId=' + Id()}, text:'Manage Sections', visible:Id() != null"></a>
        </p>
    </td>
</tr>